
class OuterApiService

  FRANCHISERS_URL = "https://api.chuanggj.com/web/fetch_source.json"

  class << self

    def get_franchisers
      result = RestClient.get(FRANCHISERS_URL)
      if [200, 304].include? result.code
        JSON.parse(result.body)['company']
      else
        []
      end
    end

  end

end
